(function(){

	if (!window.CJ) {
		window.CJ = {};
	}
	if (!window.CJ.plugin) {
		window.CJ.plugin = {};
	}

	CJ.plugin.device = {
		init : function () {
			this.DeviceAPI = document.getElementById('device');
		},
		isConnected : function () {
			try{
				return this.DeviceAPI.net_isConnected;
			} catch  (err) {
				console.log(err.message);
			}
		},
		supportVoiceRecog : function () {
			try{
				return this.DeviceAPI.supportVoiceRecog;
			} catch  (err) {
				console.log(err.message);
			}
		},
		getPlatform: function () {
			try{
				return this.DeviceAPI.platform;
			} catch  (err) {
				console.log(err.message);
			}
		}
	};

	$(document).ready(function(){
		CJ.plugin.device.init();
	});

})();